﻿<!DOCTYPE html>
<html>
	<head>
		<title>航班选择</title>
		<meta charset="utf-8"/>
		<link rel="stylesheet" type="text/css" href="iconfont/iconfont.css">
		<link rel="stylesheet" type="text/css" href="css/nanhang.css">
		<link rel="stylesheet" type="text/css" href="css/HBchoose.css">
		<link rel="stylesheet" href="layui/css/layui.css" media="all">
		<link rel="stylesheet" type="text/css" href="IIInsomniaCityPicker/css/cityPicker.css">
		<script type="text/javascript" src="IIInsomniaCityPicker/js/jquery-2.1.3.min.js"></script>
		<script type="text/javascript" src="IIInsomniaCityPicker/js/jquery.cookie.js"></script>

		<script src="js/top.js"></script>
		<script src="js/nanhang.js"></script>
		<script src="layui/layui.js"></script>
		<script src="js/datechoose.js"></script>

		<script type="text/javascript" src="IIInsomniaCityPicker/js/cityData.js"></script>
		<script type="text/javascript" src="IIInsomniaCityPicker/js/cityPicker.js"></script>
		<script src="js/citychoose.js"></script>
		<script type="text/javascript">
             function GetQueryString(name)
            {
                var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
                var URL =  decodeURI(window.location.search);
                var r = URL.substr(1).match(reg);
                if(r!=null)return  unescape(r[2]); return null;
            };

            $(document).ready(function () {
				loadpage();
            });

            function loadpage() {
                var flightNo=GetQueryString("flightNo");
                var deptCity=GetQueryString("deptC");
                var arrCity=GetQueryString("arrC");
                var flightD=mydate(GetQueryString("flightD"));
                var time=myhm(GetQueryString("flightD"));

                var cnf=GetQueryString("cnf");
                var cpf=GetQueryString("cpf");

                var cny=GetQueryString("cny");
                var cpy=GetQueryString("cpy");

                var cne=GetQueryString("cne");
                var cpe=GetQueryString("cpe");

                var cnr=GetQueryString("cnr");
                var cpr=GetQueryString("cpr");

                $("#deptc").val(deptCity);
                $("#arrc").val(arrCity);
                $("#flightd").val(flightD);
                $(".dingpiaoNO").text(flightNo);
                $(".dingpiaodept").text(deptCity);
                $(".dingpiaoarr").text(arrCity);
                $(".ftime").text(time);
                $(".travel").text(deptCity+"——"+arrCity);
                $(".fdate").text(flightD);
                $(".fprice").text("￥"+cpf);

            }

            function toBook() {
                var flightNo=GetQueryString("flightNo");
                var deptCity=GetQueryString("deptC");
                var arrCity=GetQueryString("arrC");
                var flightD=mydate(GetQueryString("flightD"));
                var time=myhm(GetQueryString("flightD"));

                var cnf=GetQueryString("cnf");
                var cpf=GetQueryString("cpf");

                var cny=GetQueryString("cny");
                var cpy=GetQueryString("cpy");

                var cne=GetQueryString("cne");
                var cpe=GetQueryString("cpe");

                var cnr=GetQueryString("cnr");
                var cpr=GetQueryString("cpr");
				window.location.href="booking.html?flightNo="+flightNo+"&deptCity="+deptCity+"&arrCity="+arrCity+"&flightDate_Dept_Date="+flightD+"&flightDate_Arr_Date="+flightD+"&flightDate_Dept_Time="+time+"&flightDate_Arr_Time="+time+"&flightCabin="+cnf+"&flightprice="+cpf+"";
            }

             function mydate(var1) {
                 var date = new Date(var1);
                 Y = date.getFullYear() + '-';
                 M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
                 D = date.getDate() + ' ';
                 h = date.getHours() + ':';
                 m = date.getMinutes() + ':';
                 s = date.getSeconds();
                 return Y+M+D;
             }


             function myhm(var1) {
                 var date = new Date(var1);
                 Y = date.getFullYear() + '-';
                 M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
                 D = date.getDate() + ' ';
                 h = date.getHours() + ':';
                 m = date.getMinutes() ;
                 s = date.getSeconds();
                 return h+m;
             }


			
		</script>
	</head>
	<body>
		<div class="container">
			
			<div class="middle">
				<div class="con">
					<div class="plan">
						<div class="dot"></div>
						<ul>
							<li>
								<div>
									1
								</div>
								<span>航班查询</span>
								<div></div>
							</li>
							<li class="active">
								<div>
									2
								</div>
								<span>航班选择</span>
								<div></div>
							</li>
							<li>
								<div>
									3
								</div>
								<span>旅客信息</span>
								<div></div>
							</li>
							<li>
								<div>
									4
								</div>
								<span>支付订单</span>
								<div></div>
							</li>
							<li>
								<div>
									5
								</div>
								<span>完成支付</span>
							</li>
						</ul>
						<div class="clear"></div>
					</div>
					<div class="flight-msg">
						<div class="flight-info">
							<div class="flight-way">
								<a href="javascript:;" class="active">单程</a>
								<a href="javascript:;">往返</a>
								<a href="#">多程<span class="iconfont">&#xe6b4;</span>&gt;&gt;</a>
								<span>航班信息更新于17分钟前<a href="#">获得最新票价</a></span>
							</div>
							<div class="clear"></div>
							
							<div class="flight-place cty-dan">
								<form action="" method="post">
									<ul>
										<li>
											<span>出发城市</span>
											<input type="text" class="cityChoiceFrom" id="deptc"/>
											<input type="hidden" id="province3" value="">
											<input type="hidden" id="city3" value="">
											<a href="#"></a>
										</li>
										<li><a href="#"></a></li>
										<li>
											<span>到达城市</span>
											<input type="text" class="cityChoiceTo" id="arrc"/>
											<input type="hidden" id="province4" value="">
											<input type="hidden" id="city4" value="">
											<a href="#"></a>
										</li>
										<li>
											<span>出发日期</span>
											<input type="text" class="test-item" id="flightd"/>
											<a href="#"></a>
										</li>
									</ul>
									<input type="submit" value="重新查询">
								</form>
							</div>
							<div class="clear"></div>
							<div class="flight-place cty-duo">
								<form action="" method="post">
									<ul>
										<li>
											<span>出发城市</span>
											<input type="text" class="cityChoiceFrom" value="北京" id="dept"/>
											<input type="hidden" id="province1" value="">
											<input type="hidden" id="city1" value="">
											<a href="#"></a>
										</li>
										<li><a href="#"></a></li>
										<li>
											<span>到达城市</span>
											<input type="text" class="cityChoiceTo" value="乌鲁木齐"/>
											<input type="hidden" id="province2" value="">
											<input type="hidden" id="city2" value="">
											<a href="#"></a>
										</li>
										<li>
											<span>出发日期</span>
											<input type="text" class="test-item" value="2018-07-27"/>
											<a href="#"></a>
										</li>
										<li>
											<span>返回日期</span>
											<input type="text" class="test-item" value="2018-07-27"/>
											<a href="#"></a>
										</li>
									</ul>
									<input type="submit" value="重新查询">
								</form>
							</div>
							<div class="clear"></div>		
						</div>
						<div class="clear"></div>
						<div class="flight-go">
							<span class="travel">去程:北京-乌鲁木齐</span>
							<span class="fdate">2018年07月27日</span>
							<span>旅客人数:成人&times;1&nbsp;&nbsp;儿童&times;0&nbsp;&nbsp;婴儿&times;0</span>
						</div>
						<div class="clear"></div>
						<div class="flight-times">
							<ul>
								<li class="bgg fxl"><a href="#"><div></div></a></li>
								<li><a href="#" class="week"><p>星期二&nbsp;07-24</p><span>&yen;--</span></a></li>
								<li><a href="#" class="week"><p>星期三&nbsp;07-25</p><span>&yen;2630</span></a></li>
								<li><a href="#" class="week"><p>星期四&nbsp;07-26</p><span>&yen;2630</span></a></li>
								<li class="active"><a href="#" class="week"><p>星期五&nbsp;07-27</p><span>&yen;2630</span></a></li>
								<li><a href="#" class="week"><p>星期六&nbsp;07-28</p><span>&yen;2630</span></a></li>
								<li><a href="#" class="week"><p>星期日&nbsp;07-29</p><span>&yen;2630</span></a></li>
								<li><a href="#"><p>星期一&nbsp;07-30</p><span>&yen;--</span></a></li>
								<li class="bgg fxr"><a href="#"><div></div></a></li>
								<li class="bgg"><a href="#"><span>低价日历</span></a></li>
							</ul>
						</div>
						<div class="clear"></div>
						<div class="flight-all">
							<div class="flight-seat">
								<span>价格保障&nbsp;买贵全赔</span>
								<span>价格</span>
							</div>
							<div class="clear"></div>
							<div class="flight-kind">
								<ul class="qaz">
									<li>
										<div class="time">
											<p class="ftime">07:40</p>
											<span class="dingpiaodept">
												北京
											</span>
										</div>
										<div class="num">
											<p class="dingpiaoNO">CZ6931<span></span></p>
											<a href="#">
												波音737
											</a>
										</div>
										<div class="time">
											<p>09:15</p>
											<span class="dingpiaoarr">
												乌鲁木齐
											</span>
										</div>
										<div>
											<a href="#">
												<span>详细</span>
												<div>
													<i></i>
												</div>
											</a>
										</div>
									</li>
									<li>
										<p class="fprice">&yen;7890</p>
									</li>
									<li>
										<form action="#" method="post">
											<input type="button" value="预订" onclick="toBook();"/>
										</form>
									</li>
								</ul>
								<ul>
									<li>
										<div class="time">
											<p  class="ftime">07:40</p>
											<span class="dingpiaodept">北京</span>
										</div>
										<div class="num">
											<p class="dingpiaoNO">CZ6931<span></span></p>
											<a href="#">波音737</a>
										</div>
										<div class="time">
											<p>09:10</p>
											<span class="dingpiaoarr">乌鲁木齐</span>
										</div>
										<div>
											<a href="#">
												<span>详细</span>
												<div>
													<i></i>
												</div>
											</a>
										</div>
									</li>
									<li>
										<p class="fprice">&yen;7890</p>
									</li>
									<li>
										<form action="#" method="post">
											<input type="button" value="预订"/>
										</form>
									</li>
								</ul>
								<ul class="qaz">
									<li>
										<div class="time">
											<p class="ftime">07:40</p>
											<span class="dingpiaodept">北京</span>
										</div>
										<div class="num">
											<p class="dingpiaoNO">CZ6931<span></span></p>
											<a href="#">波音737</a>
										</div>
										<div class="time">
											<p>09:30</p>
											<span class="dingpiaoarr">乌鲁木齐</span>
										</div>
										<div>
											<a href="#">
												<span>详细</span>
												<div>
													<i></i>
												</div>
											</a>
										</div>
									</li>
									<li>
										<p class="fprice">&yen;7890</p>
									</li>
									<li>
										<form action="#" method="post">
											<input type="button" value="预订"/>
										</form>
									</li>
								</ul>
								<ul>
									<li>
										<div class="time">
											<p class="ftime">07:40</p>
											<span class="dingpiaodept">北京</span>
										</div>
										<div class="num">
											<p class="dingpiaoNO">CZ6931<span></span></p>
											<a href="#">波音737</a>
										</div>
										<div class="time">
											<p>09:25</p>
											<span class="dingpiaoarr">乌鲁木齐</span>
										</div>
										<div>
											<a href="#">
												<span>详细</span>
												<div>
													<i></i>
												</div>
											</a>
										</div>
									</li>
									<li>
										<p class="fprice">&yen;7890</p>
									</li>
									<li>
										<form action="#" method="post">
											<input type="button" value="预订"/>
										</form>
									</li>
								</ul>
								<ul class="qaz">
									<li>
										<div class="time">
											<p class="ftime">07:40</p>
											<span class="dingpiaodept">北京</span>
										</div>
										<div class="num">
											<p class="dingpiaoNO">CZ6931<span></span></p>
											<a href="#">波音737</a>
										</div>
										<div class="time">
											<p>11:50</p>
											<span class="dingpiaoarr">乌鲁木齐</span>
										</div>
										<div>
											<a href="#">
												<span>详细</span>
												<div>
													<i></i>
												</div>
											</a>
										</div>
									</li>
									<li>
										<p class="fprice">&yen;7890</p>
									</li>
									<li>
										<form action="#" method="post">
											<input type="button" id="yuding" value="预订"/>
										</form>
									</li>
								</ul>
							</div>
							<div class="clear"></div>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div class="footer">
				<div class="con">
					<div class="copyright">
						<span>Copyright(C)1997-2017 中国南方航空股份有限公司版权所有 </span><a href="#">粤ICP备05053330号</a>
					</div>
					<ul>
						<li><a href="#">关于南航</a></li>
						<li><a href="#">投资者关系</a></li>
						<li><a href="#">预订须知</a></li>
						<li><a href="#">常见问题</a></li>
						<li><a href="#">联系我们</a></li>
						<li><a href="#">"十分"关爱基金会</a></li>
					</ul>
					<div class="clear"></div>
				</div>
			</div>
		</div>	
	</body>
</html>